package org.example;

import org.example.service.IFooService;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created on 2020/3/23
 */
@SpringBootApplication
@ImportResource(locations = {"classpath:dubbo-config.xml"})
public class BarApplication {

    public static void main(String[] args) {
        SpringApplication.run(BarApplication.class, args);

//        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext("dubbo-config.xml");
//        context.start();
//        IFooService demoService = (IFooService) context.getBean("fooService");
//        String hello = demoService.hello();
//        System.out.println( "------>" + hello );
    }
}
